home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 2 / MacMania 2.toast / Demo's / Tools&Utilities / Updaters / Frontier 2.0 => 2.0.1 Upgrader / Install Files / DocServer Docs / = next >
Encoding:
Text File  |  1993-02-25  |  1.1 KB  |  17 lines  |  [TEXT/DOCS]

  1.  
  2. Verb    =
  3. Syntax    identifier = expression
  4. Action    Evaluates expression and assigns the resulting value to identifier.
  5. Examples    local (x);
  6. x = 3 * 4
  7.     » 12
  8. The assignment statement causes the value of the expression “3 * 4” to be stored in the local variable “x”.
  9.  
  10. scratchpad.when = clock.now ()
  11.     » 11/11/91; 7:36 PM
  12. In this case the expression “clock.now ()” yielded a date value, which was then assigned to the cell named “when” in the table named “scratchpad.” (The “when” cell need not have already existed.)
  13. Notes    • The identifier need not specify an existing database cell; the assignment statement will create an item with the given name in the specified table. If no table is specified, a new local variable is created in the code block where a local statement or a local script definition was most recently encountered.
  14. • While assigning values to variables without declaring them can be a timesaver, it is generally bad practice; as a script becomes more complex, it quickly becomes easy to unintentionally modify a variable in an enclosing scope level.
  15. See Also    local
  16. ==
  17.